package com.xmy.cultivate.service.impl;

import com.xmy.cultivate.entity.RecordCourse;
import com.xmy.cultivate.mapper.RecordCourseMapper;
import com.xmy.cultivate.service.IRecordCourseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 记上课 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2024-03-20
 */
@Service
public class RecordCourseServiceImpl extends ServiceImpl<RecordCourseMapper, RecordCourse> implements IRecordCourseService {

    @Autowired
    RecordCourseMapper recordCourseMapper;



    @Override
    public Integer updateDeleted(Long id, Integer deleted){
        return recordCourseMapper.updateDeleted(id,deleted);
    }

    @Override
    public Integer getRecordCountArrive(Integer yearPart,
                                        Integer quarterNum,
                                        Long studentId,
                                        Long subjectsId){
        return recordCourseMapper.getRecordCountArrive(yearPart,quarterNum,studentId,subjectsId);
    }

    @Override
    public Integer getMaxLessonNumForInClass(Integer yearPart,
                                             Integer quarterNum,
                                             Integer lessonType){
        return recordCourseMapper.getMaxLessonNumForInClass(yearPart,quarterNum,lessonType);
    }
}
